﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using nanoCMS.Blog.Concrete;
using nanoCMS.Blog.Providers;
using nanoCMS.Core;
using nanoCMS.Core.Test;


namespace nanoCMS.Blog.Test
{
    [TestClass]
    public class BlogPostProvider_Test
    {
		//[TestMethod]
		//public void BlogPost_Simple_Add_Authorized()
		//{
		//    //12 is UserID of user in db
		//    //TODO: remove magic numbers
		//    HttpContext.Current = Helpers.FakeHttpContext("12");
		//    WorldContext wContext = new WorldContext();
		//    BlogPost blogPost;
		//    BlogPostProvider blogPostProvider = new BlogPostProvider(wContext);

		//    blogPostProvider.Add("Test", "summary", "content", true, DateTime.Now, 
		//        DateTime.Now.AddDays(30), false, "", out blogPost);
		//    Assert.AreEqual(blogPost.BlogPostID, 1);
		//}


		//[TestMethod]
		//public void BlogPost_Add_To_Category()
		//{
		//    //12 is UserID of user in db
		//    //TODO: remove magic numbers
		//    HttpContext.Current = Helpers.FakeHttpContext("12");
		//    WorldContext wContext = new WorldContext();
		//    BlogPost blogPost;
		//    BlogCategory blogCategory;
		//    BlogPostProvider blogPostProvider = new BlogPostProvider(wContext);
		//    BlogCategoryProvider blogCategoryProvider = new BlogCategoryProvider(wContext);
		//    blogCategoryProvider.Add("test", "test", out blogCategory, 1);

		//    blogPostProvider.Add("Test", "summary", "content", true, DateTime.Now,
		//        DateTime.Now.AddDays(30), false, "", out blogPost);
            
		//    Assert.AreEqual(blogCategoryProvider.AddBlogPostToCategory(blogPost.BlogPostID, blogCategory.BlogCategoryID), true);
		//}

    }
}
